//index.js
//获取应用实例
const app = getApp()
const Pager = require('components/aotoo/core')



Pager({
  data: {
    pages: {
      type :{
        is: 'scroll', 
        'scroll-y': true
      },
      data: [
        {
          title: {title: '订单信息', itemClass: 'fw-bold item-head only title-default'},
          body: [
            { title: '订单编号', body: [{title: '2020051300000712'}, {title: '复制', itemClass: 'ss-tag tag-grey round ml-auto', aim: 'onCopy?title=没什么大不了，死不了就还好'}], bodyClass: 'item-content', itemClass: 'item-flex'},
            { title: '下单时间', body: [{title: '2020-05-08 17:05:45'}, {title: ' ', itemClass: 'icon-after-toggle ml-auto'}], bodyClass: 'item-content', itemClass: 'item-flex'},
            { title: '支付时间', body: [{title: '2020-05-08 17:05:45'}], bodyClass: 'item-content', itemClass: 'item-flex'},
          ],
          bodyClass: 'item-body',
          itemClass: 'card-item color-title size-form'
        },

        {
          title: [
            {
              '@item': {
                title: [{title: '没什么大不了大酒店', itemClass: 'fw-bold'}, {title: '酒店详情', itemClass: 'ss-active icon-after-toggle fw-normal size-form'}],
                body: [{title: '内容说明详细说明内容说明详细说明内容'}],
                footer: [{title: '地图/导航', itemClass: 'ss-tag tag-grey plain xlarger', aim: 'onMap'}, {title: '联系电话', itemClass: 'ss-tag tag-grey plain xlarger ml-minor', aim: 'onPhone'}],
                dot: [{title: ' ', itemClass: 'bb-default-m-tb'}],
                footerClass: 'flex-row mt-minor',
                titleClass: 'flex-row-between-center title-default no-lh',
                bodyClass: 'size-form no-lh mt-minor'
              },
            },
            {
              '@item': {
                title: [{title: '明星汇经典双床房 1间'}, {title: '预订须知', itemClass: 'ss-active icon-after-toggle size-form fw-normal'}],
                body: [{title: '12月1号'}, {title: '-'}, {title: '12月3号'}, {title: '共2晚'}, ],
                dot: [{title: ' ', itemClass: 'bb-default mtb-d-m'}],
                titleClass: 'flex-row-between-center title-primary no-lh',
                bodyClass: 'flex-row size-form no-lh mt-minor'
              },
            }
          ],
          body: [
            { title: '订单编号', body: [{title: '2020051300000712'}, {title: '复制', itemClass: 'ss-tag tag-grey round', aim: 'onCopy?title=没什么大不了，死不了就还好'}], bodyClass: 'item-content', itemClass: 'item-flex'},
            { title: '下单时间', body: [{title: '2020-05-08 17:05:45'}, {title: ' ', itemClass: 'icon-after-toggle'}], bodyClass: 'item-content', itemClass: 'item-flex'},
            { title: '支付时间', body: [{title: '2020-05-08 17:05:45'}], bodyClass: 'item-content', itemClass: 'item-flex'},
          ],
          bodyClass: 'item-body',
          itemClass: 'card-item mt-default color-default size-form',
          titleClass: 'item-head'
        },
      ],
      listClass: 'hei-p100',
      itemClass: 'm-default'
    }
  },
  onMap(e, parmas, inst) {
    wx.navigateTo({
      url: '../map/index'
    })
  },
  onPhone(e, parmas, inst) {
    wx.makePhoneCall({
      phoneNumber: '13724140596' //仅为示例，并非真实的电话号码
    })
  },
  onCopy(e, parmas, inst) {
    const title = parmas.title
    wx.setClipboardData({
      data: title,
      success (res) {
        wx.getClipboardData({
          success (res) {
            console.log(res.data) // data
          }
        })
      }
    })
  },
  onShow: function () {},
  onReady: function () {},
  onLoad: function () {},
})
